package indi.cc.demo.validator.message;

import java.io.Serializable;
import java.util.Objects;

public class MessageResponse implements Serializable
{
    private static final long serialVersionUID = 1L;

    private String message;
    private MessageType type;
    private String ref_field;

    public MessageResponse()
    {
        super();
    }
    
    public MessageResponse(final String message, final MessageType type)
    {
        this.message = message;
        this.type = type;
    }
    
    public MessageResponse(final String message)
    {
        this.message = message;
    }

    public MessageResponse(String message, MessageType type, String ref_field)
    {
        super();
        this.message = message;
        this.type = type;
        this.ref_field = ref_field;
    }

    public String getMessage()
    {

        return message;
    }

    public void setMessage(String message)
    {
        this.message = message;
    }

    public MessageType getType()
    {

        return type;
    }

    public void setType(MessageType type)
    {
        this.type = type;
    }

    public String getRef_field()
    {

        return ref_field;
    }

    public void setRef_field(String ref_field)
    {
        this.ref_field = ref_field;
    }
    
    @Override
    public int hashCode()
    {
        return Objects.hash(message, type , ref_field);
    }
    
    @Override
    public boolean equals(Object obj)
    {
        if (null == obj)
        {
            return false;
        }
        if (this.getClass() != obj.getClass())
        {
            return false;
        }
        MessageResponse messageResponse = (MessageResponse)obj;
        return messageResponse.message.equals(message) && messageResponse.type.equals(type) && messageResponse.ref_field.equals(ref_field);
    }
}
